package io.renren.config;

import com.github.wxpay.sdk.WXPayConfig;
import org.apache.commons.io.IOUtils;

import java.io.InputStream;
//加载证书
//private byte [] certData;
public class WxPayConfig implements WXPayConfig {
    /** 加载证书  这里证书需要到微信商户平台进行下载*/
    private byte [] certData;
    public WxPayConfig() throws  Exception{
        InputStream certStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("cert\\wxpay\\ca-req.csr");
        this.certData = IOUtils.toByteArray(certStream);
        certStream.close();
    }
//    服务商ID
    @Override
    public String getAppID() {
        return "wxd678efh567hg6787";
    }
//    商户号
    @Override
    public String getMchID() {
        return "1230000109";
    }
    @Override
    public String getKey() {
        return "5K8264ILTKCH16CQ2502SI8ZNMTM67VS";
    }
    @Override
    public InputStream getCertStream() {
        return null;
    }

    @Override
    public int getHttpConnectTimeoutMs() {
        return 0;
    }

    @Override
    public int getHttpReadTimeoutMs() {
        return 0;
    }
}
